  <div class="row">
      <div class="col-lg-12">
          <section class="panel">
              <header class="panel-heading">
                  代理商列表
              </header>
              <div class="panel-body">
                <div class="clearfix">
                    <div class="btn-group">
                        <span class="btn btn-primary" >
                          <%= link_to fa_icon("plus"), new_admin_agent_path %>
                        </span>
                    </div>
                </div>
                <div class="space15"></div>

                <table class="table table-striped table-advance table-hover">
                  <thead>
                  <tr>
                      <th>个人/公司</th>
                      <th>公司名/个人名</th>
                      <th>行业</th>
                      <th>代理的城市</th>
                      <th>联系人</th>
                      <th>电话</th>
                      <th>电子邮箱</th>
                      <th>状态</th>
                      <th></th>
                  </tr>
                  </thead>
                    <tbody>
                    <% @agents.each do |agent| %>
                      <tr>
                        <td><%= agent.agent_info.try(:category) %></td>
                        <td><%= agent.agent_info.try(:name) %></td>
                        <td><%= agent.agent_info.try(:industry) %></td>
                        <td><%= agent.agent_info.try(:city) %></td>
                        <td><%= agent.agent_info.try(:contact) %></td>
                        <td><%= agent.agent_info.try(:telephone) %></td>
                        <td><%= agent.email %></td>
                        <td><%= t(".#{agent.agent_info.try(:status)}") %></td>
                        <td>
                          <span class="btn btn-success btn-xs"><%= link_to fa_icon("check"), [:admin, agent] %></span>
                          <span class="btn btn-primary btn-xs"><%= link_to fa_icon("pencil"), edit_admin_agent_path(agent) %><i class="icon-pencil"></i></span>
                          <span class="btn btn-danger btn-xs"><%= link_to fa_icon("trash-o"), [:admin, agent], method: :delete, data: { confirm: 'Are you sure?' } %></span>
                        </td>
                      </tr>
                    <% end %>
                  </tbody>
              </table>
              </div>
          </section>
      </div>
  </div>
  <!-- page end-->

